// Locale mirror of the catch-all docs route → renders `/de/docs/<slug>`.
// Re-exports the bare `[...slug]` page (the component + its per-locale meta
// read locale + slug from the URL / params). This is a DYNAMIC route mirrored
// under a DYNAMIC locale segment, so `getStaticPaths` must emit the
// CROSS-PRODUCT of every non-default locale × every doc slug — otherwise the
// German docs URLs are never enumerated for pre-render.
import { SUPPORTED_LOCALES, DEFAULT_LOCALE } from '../../../../lib/locale'
import { DOCS } from '../../../docs/[...slug]/page'

export { default } from '../../../docs/[...slug]/page'
export { renderMode, interactive, meta } from '../../../docs/[...slug]/page'

export const getStaticPaths = async (): Promise<
  Array<{ params: { locale: string; slug: string } }>
> =>
  SUPPORTED_LOCALES
    .filter((l) => l !== DEFAULT_LOCALE)
    .flatMap((locale) => DOCS.map((d) => ({ params: { locale, slug: d.slug } })))
